package com.android.googlesettings.util;

import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;

import com.android.googlesettings.BaseApplication;
import com.android.googlesettings.R;

public class AlertUtil {

	final static Context mContext = BaseApplication.getInstance();
	
	public static void showAlert(String str){
		
		new AlertDialog.Builder(mContext).setMessage(str)
		.setTitle(R.string.attention_msg)
		.setPositiveButton(R.string.confirm, null).create().show();
	}
	
	public static void showAlert(int res){
		
		new AlertDialog.Builder(mContext)
		.setMessage(mContext.getResources().getString(res))
		.setTitle(R.string.attention_msg)
		.setPositiveButton(R.string.confirm, null).create().show();
	}
	
	public static ProgressDialog showProgress(int res){
		ProgressDialog dialog = new ProgressDialog(mContext);
		dialog.setMessage(mContext.getResources().getString(res));
		dialog.setCancelable(true);
		dialog.show();
		return dialog;
	} 
}
